package org.magicbox.qjunTPO.service.impl;

import org.magicbox.qjunTPO.entity.Deskusertype;
import org.magicbox.qjunTPO.mapper.DeskusertypeMapper;
import org.magicbox.qjunTPO.service.DeskusertypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 欢迎添加科技实践队粉丝群：690849711
 * @since 2021-12-21
 */
@Service
public class DeskusertypeServiceImpl extends ServiceImpl<DeskusertypeMapper, Deskusertype> implements DeskusertypeService {

    @Override
    public boolean resoursceAllocation(Deskusertype deskusertype) {
        Deskusertype byId = getById(deskusertype.getDeskId());
        byId.setStu2(byId.getStu1());
        byId.setStu1(deskusertype.getStu1());
        return updateById(byId);
    }
}
